import logging
import multiprocessing
import time

from log_manager import LogManager


def worker():
    logger = logging.getLogger("process")
    while True:
        logger.info("dddddddddddddddddddd")
        time.sleep(2)


if __name__ == '__main__':
    # 创建一个记录器
    sys_log_manager = LogManager()
    sys_log_manager.start_multiprocess_logging()
    # log_manager = LogManager()
    # log = log_manager.get_logger()
    logs = sys_log_manager.get_logger()

    logs.info("ssssssssssss")
    multiprocessing.Process(target=worker, args=(), daemon=True).start()
    while True:
        # logs.info("ssssssssssss000")
        time.sleep(2)
